# from django.test import TestCase
# import redis
# # Create your tests here.
# # 直接链接redis
# conn = redis.Redis(host='182.116.70.238',port=6379,password='zjy559988',encoding='utf8')
#
# # 设置键值: 15188397061='9999'且超时时间为10s（值写入redis时自动转字符串）
# conn.set('15188397061',9999,ex=10)
#
# # 根据键值： 如果存在获取值
# value = conn.get('15188397061')
# print(value)
class Car:
    def __init__(self,name,loss):
        self.name = name
        self.lose = loss
    def getName(self):
        return self.name

    def getPrice(self):
        return self.loss[0]

    def getLose(self):
        return self.lose[1] * self.lose[2]

obj = Car("bmw",[60,90,500])
print(getattr(obj,"name"))
print(dir(obj))

